# -*- coding: utf-8 -*-
# @Time:2021/04/27 21:47
# @Author:Cindy
from appium.webdriver.common.mobileby import MobileBy
from pages.base_page import BasePage
from pages.contact_page import ContactPage


class MainPage(BasePage):

    def goto_contact_page(self):
        # 点击[通讯录]按钮
        contact_button = (MobileBy.XPATH, "//*[@text='通讯录']")
        self.find(contact_button).click()
        # 进入[通讯录]页面
        return ContactPage(self.driver)
